From c24f98944dc80b9bef5ec50427d00eb6b1b6959d Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Mon, 26 Mar 2007 14:09:36 +0100 Subject: [PATCH] Don't set memory_dynamic_max when xm mem-set is called. Save the VM configuration unconditionally when either the max or the target memory values are set. Thanks to Masaki Kanno for pointing out the first problem. Signed-off-by: Ewan Mellor --- tools/python/xen/xend/XendDomainInfo.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 091d2241c9..c783b171a5 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -586,8 +586,7 @@ class XendDomainInfo: if self.domid >= 0: self.storeVm("memory", target) self.storeDom("memory/target", target << 10) - else: - xen.xend.XendDomain.instance().managed_config_save(self) + xen.xend.XendDomain.instance().managed_config_save(self) def setMemoryMaximum(self, limit): """Set the maximum memory limit of this domain @@ -608,9 +607,7 @@ class XendDomainInfo: return xc.domain_setmaxmem(self.domid, maxmem) except Exception, ex: raise XendError(str(ex)) - else: - self.info['memory_dynamic_max'] = limit * MiB - xen.xend.XendDomain.instance().managed_config_save(self) + xen.xend.XendDomain.instance().managed_config_save(self) def getVCPUInfo(self): -- 2.30.2